<?php
/**
 * Created by PhpStorm.
 * User: gm
 * Date: 2018/12/12
 * Time: 14:30
 */
include "config.php";
include "status.php";

$GID=$_REQUEST["gid"];
$UID=$_REQUEST["uid"];
$sql="DELETE FROM cart WHERE g_id=? and u_id=?;";
$stmt=$conn->prepare($sql);
$stmt->bind_param("ii",$GID,$UID);
$stmt->execute();
if($stmt->affected_rows>=1){
    print_r(json_encode(Status::$d_s));
}else{
    print_r(json_encode(Status::$d_f));
}
$stmt->close();
$conn->close();